package com.sky.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sky.domain.OmsOrderReturnApply;
import com.sky.service.OmsOrderReturnApplyService;
import com.sky.mapper.OmsOrderReturnApplyMapper;
import com.sky.service.OmsOrderReturnReasonService;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;

/**
* @author Administrator
* @description 针对表【oms_order_return_apply(订单退货申请)】的数据库操作Service实现
* @createDate 2024-06-30 16:46:10
*/
@Service
public class OmsOrderReturnApplyServiceImpl extends ServiceImpl<OmsOrderReturnApplyMapper, OmsOrderReturnApply> implements OmsOrderReturnApplyService{

    @Resource
    private OmsOrderReturnReasonService omsOrderReturnReasonService;
    @Resource
    private OmsOrderReturnApplyService omsOrderReturnApplyService;

    @Override
    public Object test() throws InterruptedException {
        Future<Integer> future = omsOrderReturnReasonService.test();
        try {
            future.get();
        } catch (ExecutionException e) {
            throw new RuntimeException(e);
        }
        System.out.println("主线程已完成");
        Thread.sleep(1000);
        return "测试";
    }
}




